//
//  MLoginModel.m
//  ios-test
//
//  Created by Apple -11 on 15/10/27.
//  Copyright (c) 2015年 Apple -11. All rights reserved.
//

#import "MLoginModel.h"

@implementation MLoginModel


-(id)getLoginResultWithDictionaryJSON:(NSDictionary *)dct{
    if (dct) {
        MLoginModel *model = [[MLoginModel alloc] init];
        model.loginName = (dct[@"LoginName"]==[NSNull null])?@"":dct[@"LoginName"];
        model.loginPwd = (dct[@"LoginPwd"]==[NSNull null])?@"":dct[@"LoginPwd"];
        return model;
    }
    return nil;
}
-(id)getLoginResultWithArrayJSON:(NSArray *)array{
    if (array) {
        NSMutableArray *data=[NSMutableArray array];
        for (NSDictionary *dct in array) {
            [data addObject:[self getLoginResultWithDictionaryJSON:dct]];
        }
        return data;
    }
    return nil;

}
-(id)getMerchantProductListResultWithArrayJSON:(NSArray *)array{
    if (array) {
        NSMutableArray *data=[NSMutableArray array];
        for (NSDictionary *dct in array) {
            [data addObject:[self getLoginResultWithDictionaryJSON:dct]];
        }
        return data;
    }
    return nil;

}
@end
